<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            padding: 0;
            margin: 0;
            box-sizing: border-box;
        }

        input {
            width: 100%;
            height: 30px;
            border: 1px solid orange;
            outline: none;
            border-radius: 20px;
            padding-left: 25px;
            margin: 10px 0;
        }

        .anqiu {
            display: flex;
            justify-content: space-around;
            align-items: center;
            margin: 10px 0;
        }

        .anqiu button {
            width: 30%;
            height: 30px;
            background-color: rgb(94, 178, 178);
            border: none;
            color: #fff;
        }

        .cunfang {
            width: 95%;
            margin: 10px auto;
            height: 45px;
            background-color: aqua;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .cunfang input {
            width: 20px;
            height: 20px;
        }
    </style>
</head>

<body>
    <div id="root">
        <input type="text" placeholder="输入内容,按下回车键添加" v-model="name" @keyup.enter="down">
        <div class="anqiu">
            <button>总任务({{arr.length}})</button>
            <button>已完成({{arr.length-nowancheng}})</button>
            <button style="background-color: red;">未完成({{nowancheng}})</button>
        </div>
        <h3>任务列表</h3>
        <div class="cunfang" v-for="(item,index) in arr" :key="index">
            <input type="checkbox" :checked="item.status" @click="sanyuan(item)">
            <span> {{item.id}} </span>
            <span>{{item.name}}</span>
            <span style="float: right;padding-left:45px ;" @click="deleteRow(index)">删除</span>
        </div>
        <div class="imga" v-show="arr.length == 0">
            <img src="https://ts1.cn.mm.bing.net/th/id/R-C.cea38bc4cf51c9b6ff1bbdf434dead7b?rik=fDdZNQqBueGUSQ&riu=http%3a%2f%2fimg.xiazaizhijia.com%2fuploads%2f2016%2f1109%2f20161109113435641.gif&ehk=R%2bwp4br%2fLo24QHzDxcd4gdTh%2b6JKc7dAO9FPx7mWSy8%3d&risl=&pid=ImgRaw&r=0"
                alt="">
        </div>
    </div>
</body>

</html>
<script src="./vue-2.5.21.js"></script>
<script src="./todoList.js"></script>